package com.app.util.db.bean;

public class Limit {

	private int offset = -1;
	private int rows;

	public Limit(int rows) {
		this.rows = rows;
	}

	public Limit(int offset, int rows) {
		this.offset = offset;
		this.rows = rows;
	}

	public int getOffset() {
		return offset; 
	}

	public int getRows() {
		return rows;
	}

	public String toString() {
		if (offset == -1) {
			return "LIMIT " + rows;
		}
		return "LIMIT " + offset + "," + rows;
	}
}